package com.gzx.plugin.tjzy.feign.liaison.controller;

import com.gzx.plugin.tjzy.feign.liaison.service.GzxDebtorLiaisonFeignService;
import com.gzx.tjzy.feign.req.liaison.GzxDebtorLiaisonReqDto;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zjt
 * @description
 * @date 2025/2/13 10:04
 */
@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/feign/tjzy/liaison")
public class GzxDebtorLiaisonFeignController {

    private final GzxDebtorLiaisonFeignService debtorLiaisonFeignService;

    /**
     * 三方联系人数据同步
     *
     * @param debtorLiaisonReqDtoList
     */
    @RequestMapping("/sync")
    public void sync(@RequestBody List<GzxDebtorLiaisonReqDto> debtorLiaisonReqDtoList) {
        log.info("三方联系人数据同步开始......{}", debtorLiaisonReqDtoList);
        debtorLiaisonFeignService.insertBatch(debtorLiaisonReqDtoList);
    }
}
